package ${basepackage}.mapper;

import ${basepackage}.base.mapper.${table.className}Mapper;
import ${basepackage}.domain.${table.className}Bean;
import cc.hwtech.core.mybatis.domain.Page;
import cc.hwtech.core.mybatis.domain.PageRequest;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>Project: bee-projects</p>
 * <p>Title: ${table.className}BeanMapper.java</p>
 * <p>Description:   </p>
 * <p>Copyright: Copyright (c) 2016 </p>
 * <p>Company: 华炜云商科技有限公司 www.hwtech.cc</p>
 *
 * @author zh
 * @version 1.0
 * @date 2017-03-09
 */
public interface ${table.className}BeanMapper extends ${table.className}Mapper {

    /**
     * 通过ID查找bean
     * @param id        [必填] ID
     * @param aId       [非必填] 操作用户ID
     * @return          如果能查询到，返回bean对象；如果查询不到，返回null
     */
    public ${table.className}Bean selectBeanById(@Param("id") ${table.idColumn.simpleJavaType} id, @Param("aId") Integer aId);

    /**
     * 分页查找
     * @param pageRequest        [必填] PageRequest对象
     * @param ${table.classNameFirstLower}Bean        [必填] 分页条件
     * @param aId                [非必填] 操作用户ID
     * @return                   分页对象
     */
    public Page<${table.className}Bean> selectBeanPage(PageRequest pageRequest, @Param("entity") ${table.className}Bean ${table.classNameFirstLower}Bean, @Param("aId") Integer aId);

    /**
     * 查找所有指定条件对象
     * @param ${table.classNameFirstLower}Bean        [必填] 查询条件
     * @param aId                [非必填] 操作用户ID
     * @return                   满足条件的对象集合
     */
    public List<${table.className}Bean> selectBeanAll(@Param("entity") ${table.className}Bean ${table.classNameFirstLower}Bean, @Param("aId") Integer aId);
}